<template>
	<view>
		<view class="search-comtainer" @click="myclick" :style="{ backgroundColor: bgcolor }">
			<view class="search-box" :style="{borderRadius: radius}">
				<uni-icons type="search" size="20"></uni-icons><text class="placeholder">搜索</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "my-search",
		data() {
			return {

			};
		},
		props:{
			bgcolor:{
				type:String,
				default:'#FF5A5F'
			},
			radius:{
				type:Number,
				default:18
			}
		},
		methods: {
			myclick() {
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
	.search-comtainer {
		background-color: #FF5A5F;
		height: 50px;
		padding: 0 10px;
		display: flex;
		align-items: center;

		.search-box {

			background-color: #FFFFFF;
			width: 100%;
			border-radius: 18px;
			height: 36px;
			display: flex;
			justify-content: center;
			align-items: center;

			.placeholder {
				font-size: 12px;
				margin-left: 5px;
			}

		}

	}
</style>
